<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@include file="/WEB-INF/jsp/include/header.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
	<head>
	<title>仓储管理系统</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.7.1.min.js"></script>
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui-1.2.5/themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui-1.2.5/themes/icon.css">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/table.css">
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/locale/easyui-lang-zh_CN.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/plugins/jquery.validatebox.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/validatebox.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/globalMaps.js"></script>
		<script type="text/javascript">
			<c:forEach items="${globalUmUser.mdafs}" var="mdaf" varStatus="s">
				globalMaps.put('${mdaf}', '${mdaf}');
			</c:forEach>
		</script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/cms/cmsmh.js"></script>
	</head>
	<body>
		<!-- 表格 -->
		<table id="cmsmhTable" title="仓库管理" border="0" cellspacing="0" cellpadding="0" iconCls="icon-tip" width="98%" pagination="true" remoteSort="false" singleSelect="true" idField="mhaa" showFooter="false" striped="true" url="<c:url value='/cmsmh/cmsmhList.xhtml'/>">
			<thead>
				<tr align="center">
					<th field="mhaa" width="70">编号</th>
					<th field="mhab" width="80">名称</th>
					<th field="mhac" width="150">备注</th>
					<th field="mhad" width="50" formatter='mhadFormater'>状态</th>
					
					
				</tr>
			</thead>
		</table>
		<div id="cmsmhSearch" class="easyui-window" title="查询" style="padding:5px;width:250px;height:220;" iconCls="icon-search" closed="true" maximizable="false" minimizable="false" collapsible="true">
			<form method="post" name="searchForm" id="searchForm">
				<div class="ToolTip_Form" id="cmsmhSearchForm" onkeydown="if(event.keyCode==13){searchCmsmh();}">
					<table>
						<tr>
							<td>编号:</td>
							<td><input type="text" name="mhaa" id="searchMhaa" class="easyui-validatebox"></td>
						</tr>
						<tr>
							<td>名称:</td>
							<td><input type="text" name="mhab" id="searchMhab" class="easyui-validatebox"></td>
						</tr>
						<tr>
							<td align="right">状态：</td>
							<td align="left">
								<select id="searchMhad" name="mhad" style="width:150px;" class="easyui-combobox">
									<option value="">请选择</option>
									<option value="1">正常</option>
									<option value="2">禁用</option>
								</select>
							</td>
						</tr>
						<tr>
							<td align="center" colspan="2"><a class="easyui-linkbutton" iconCls="icon-search" href="javascript:void(0);" onclick="searchCmsmh()">查询</a></td>
						</tr>
					</table>
				</div>
			</form>
		</div>
		<!-- 添加 -->
		<div id="cmsmhAdd" icon="icon-save" style="padding:5px;width:300px;height:450px;">
			<form method="post" name="addForm" id="addForm">
				<div class="ToolTip_Form" id="cmsmhAddForm" onkeydown="if(event.keyCode==13){cmsmhAdd();}">
				<table>
				<tr>
					<td align="right">编号：</td>
					<td align="left"><input type="text" class="easyui-validatebox" id="cmsmhAddMhaa" name="mhaa" maxlength="12" required="true" validType="sieralNumber" missingMessage="编号不能为空!"/></td>
				</tr>
				<tr>
					<td align="right">名称：</td>
					<td align="left"><input type="text" class="easyui-validatebox" id="cmsmhAddMhab" name="mhab" maxlength="20" required="true" validType="loginName" missingMessage="不名称能为空!"/></td>
				</tr>
				<tr>
					<td align="right">备注：</td>
					<td align="left"><textarea class="easyui-validatebox" id="cmsmhAddMhac" name="mhac"></textarea></td>
				</tr>
				<tr>
					<td colspan="2" align="center">
						<a href="#" class="easyui-linkbutton" icon="icon-ok" onclick="cmsmhAdd();">提交</a>
						<a href="#" class="easyui-linkbutton" icon="icon-redo" onclick="cmsmhAddReset();">重置</a>
					</td>
				</tr>
				</table>
				</div>
			</form>
		</div>
		<!-- 编辑 -->
		<div id="cmsmhUpdate" icon="icon-update" style="padding:5px;width:300px;height:450px;">
			<form method="post" name="updateForm" id="updateForm">
				<input type="hidden" id="cmsmhInfoUpdateMhaa" name="mhaa"/>
				<div class="ToolTip_Form" id="cmsmhUpdateForm" onkeydown="if(event.keyCode==13){cmsmhEdit();}">
					<table>
						<tr>
							<td align="right">编号：</td>
							<td align="left"><span id="cmsmhUpdateMhaa"></span></td>
						</tr>
						<tr>
							<td align="right">名称：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="cmsmhUpdateMhab" name="mhab" maxlength="20" required="true" validType="loginName" missingMessage="名称不能为空!"/></td>
						</tr>
						
						<tr>
							<td align="right">状态：</td>
							<td align="left"><span id="cmsmhUpdateMhad"></span></td>
						</tr>
						<tr>
							<td align="right">备注：</td>
							<td align="left"><textarea class="easyui-validatebox" id="cmsmhUpdateMhac" name="mhac"></textarea></td>
						</tr>
						<tr>
							<td colspan="2" align="center">
								<a href="#" class="easyui-linkbutton" icon="icon-ok" onclick="cmsmhEdit();">提交</a>
								<a href="#" class="easyui-linkbutton" icon="icon-redo" onclick="cmsmhInfoAddReset(items[0],items[1],items[2],items[3],items[4],items[5],items[6],items[7],items[8],items[9],items[10],items[11],items[12]);">重置</a>
							</td>
						</tr>
					</table>
				</div>
			</form>
		</div>
	</body>
</html>